package com.ruoyi.system.domain.survey;

import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 答卷对象 survey_answer
 * 
 */
public class SurveyAnswer extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 答卷ID */
    private Long answerId;

    /** 问卷ID */
    private Long surveyId;
    
    /** 问卷标题 */
    @Excel(name = "问卷标题")
    private String surveyTitle;

    /** 用户ID（匿名问卷为空） */
    private Long userId;
    
    /** 用户名（匿名问卷为空） */
    @Excel(name = "提交用户")
    private String userName;

    /** IP地址 */
    @Excel(name = "IP地址")
    private String ipAddress;

    /** 浏览器UA */
    private String userAgent;

    /** 开始填写时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开始填写时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    /** 提交时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "提交时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /** 用时（秒） */
    @Excel(name = "用时（秒）")
    private Integer duration;

    /** 状态（0未完成 1已完成） */
    @Excel(name = "状态", readConverterExp = "0=未完成,1=已完成")
    private String status;
    
    /** 答案详情列表 */
    private List<SurveyAnswerDetail> details;

    public Long getAnswerId() {
        return answerId;
    }

    public void setAnswerId(Long answerId) {
        this.answerId = answerId;
    }

    public Long getSurveyId() {
        return surveyId;
    }

    public void setSurveyId(Long surveyId) {
        this.surveyId = surveyId;
    }

    public String getSurveyTitle() {
        return surveyTitle;
    }

    public void setSurveyTitle(String surveyTitle) {
        this.surveyTitle = surveyTitle;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getIpAddress() {
        return ipAddress;
    }

    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    public String getUserAgent() {
        return userAgent;
    }

    public void setUserAgent(String userAgent) {
        this.userAgent = userAgent;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public List<SurveyAnswerDetail> getDetails() {
        return details;
    }

    public void setDetails(List<SurveyAnswerDetail> details) {
        this.details = details;
    }

    @Override
    public String toString() {
        return "SurveyAnswer [answerId=" + answerId + ", surveyId=" + surveyId + ", userId=" + userId + ", status="
                + status + "]";
    }
} 